Using Resources in Drivers
You need to provide a number of resources for drivers, just as you do for printing extensions. Some of these resources are required for all drivers, others are required for drivers that use a certain imaging system, and others are optional. All of the resources are described in the chapter "Printing Resources" in this book. Table 3-9 summarizes the resources that you can use in all printer drivers.This section provides examples of several of these resources as used in the ImageWriter II printer driver. The contents of the the
oldapp.r
andnewapp.r
files, which contain the resource definitions for the ImageWriter II driver, are shown in the QuickDraw GX sample code.You use some of the resources in Table 3-9 for user interface features, including the icons for your driver, resources that allow users to interact with your driver, and resources that the Chooser uses when the user selects your driver. The Finder interface resources, which are common to all Macintosh drivers, are described in Inside Macintosh: More Macintosh Toolbox. The icons that you must define for your driver when the user chooses it as the desktop printer are described in the section "Defining Desktop Printer Icons for Your Printer Driver" beginning on page 3-66.
All of the resources that you define for your printer drivers need to be loaded into the system heap and need to be purgeable. System resources are stored in the system heap as opposed to the application heap, where application resources are stored. Purgeable resources can be purged by the Memory Manager when space is required, as described in Inside Macintosh: Memory. You need to specify these attributes in the first line of every resource that you define for your driver, as is done in every resource example in this chapter.
Subtopics
- Defining Code Segments in Your Driver
- Defining Version Compatibility for Your Printer Driver
- Specifying Which Messages Your Driver Overrides
- Defining the Imaging System Type of Your Driver
- Specifying How Your Driver Communicates With the Device
- Defining Network Characteristics for Your Driver
- Defining Status Messages
- Resources for Compatibility With the Macintosh Printing Manager
- Defining Device Characteristics Specific to an Imaging System
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help